using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Features
{
    /// <summary>
    /// <para>Split Line at Point</para>
    /// <para>Splits line features based on intersection or proximity to point features.</para>
    /// <para>根据相交点或点要素的邻近性分割线要素。</para>
    /// </summary>    
    [DisplayName("Split Line at Point")]
    public class SplitLineAtPoint : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SplitLineAtPoint()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The input line features to be split.</para>
        /// <para>要分割的输入线要素。</para>
        /// </param>
        /// <param name="_point_features">
        /// <para>Point Features</para>
        /// <para>The input point features whose locations will be used to split the input lines.</para>
        /// <para>输入点要素，其位置将用于分割输入线。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The new feature class that will be created containing the split lines.</para>
        /// <para>将创建包含分割线的新要素类。</para>
        /// </param>
        public SplitLineAtPoint(object _in_features, object _point_features, object _out_feature_class)
        {
            this._in_features = _in_features;
            this._point_features = _point_features;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Split Line at Point";

        public override string CallName => "management.SplitLineAtPoint";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "extent", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "workspace"];

        public override object[] ParameterInfo => [_in_features, _point_features, _out_feature_class, _search_radius];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input line features to be split.</para>
        /// <para>要分割的输入线要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Point Features</para>
        /// <para>The input point features whose locations will be used to split the input lines.</para>
        /// <para>输入点要素，其位置将用于分割输入线。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Point Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _point_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The new feature class that will be created containing the split lines.</para>
        /// <para>将创建包含分割线的新要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Search Radius</para>
        /// <para><xdoc>
        ///   <para>Used to split lines by their proximity to point features. Points within the search distance to an input line will be used to split those lines at the nearest location to the point along the line segment.</para>
        ///   <para>If this parameter is unspecified, the single nearest point will be used to split the line feature. If a radius is specified, all points within the radius will be used to split the line.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于按线与点要素的接近程度来分割线。到输入线的搜索距离内的点将用于在距离线段的点最近的位置拆分这些线。</para>
        ///   <para>如果未指定此参数，则将使用单个最近点来分割线要素。如果指定了半径，则半径内的所有点都将用于分割线。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Search Radius")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _search_radius { get; set; } = null;


        public SplitLineAtPoint SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, object extent = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, object workspace = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, extent: extent, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, workspace: workspace);
            return this;
        }

    }

}